import typescript from "@rollup/plugin-typescript";
import commonJs from '@rollup/plugin-commonjs'
import nodeResolve from '@rollup/plugin-node-resolve'
import vuePlugin from 'rollup-plugin-vue'
import externalGlobals from "rollup-plugin-external-globals";

export default {
    input: "./src/cesium/index.ts",
    output: [
        {
            file: "dist/index.umd.js",
            format: "umd",
            name: 'YtCesium',
            globals: 'YtCesium'
        },
        {
            file: "dist/index.es.js",
            format: "es",
        }
    ],
    plugins: [
        vuePlugin(),
        commonJs(),
        nodeResolve(),
        typescript({
            declaration: true,
            declarationDir: "./types",
            include: ['src/cesium/**']
        }),
        externalGlobals({
            cesium: 'Cesium'
        })
    ],


    external: ['cesium', 'dayjs', 'vue'],
};
